package com.sample.web

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.groovyflow.spring.locator.BeanLocator;
import org.groovyflow.spring.locator.BeanLocatorImpl;
import org.springframework.showcase.coverc.service.RecipeManager;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;
import org.groovy.util.*

import org.groovyflow.spring.web.*

import com.sample.*


class RunController{
    def beanLocator = new BeanLocatorImpl();

	def tryit(req, res){
		println "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2HELLO there from RunController"
		req.setAttribute("topString", "##It's quite Groovy##");
		println "attribute set xx"
		res.sendRedirect("fun_tryit.do");
		return null;
		//return new ModelAndView("redirect:../fun/tryit");
	}
	
	 protected RecipeManager getRecipeManager(){
    	return (RecipeManager) beanLocator.getBean("recipeManager");
    }

}